<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title><{:C('web_site_name')}>---系统用户添加</title>
<link rel="stylesheet" type="text/css" href="<?php echo APP_TMPL_PATH ; ?>/static/css/common.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo APP_TMPL_PATH ; ?>/static/css/main.css"/>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/layer/lib.js"></script>
<script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/layer/layer.min.js"></script>

</head>
<body>


<form id="info_form" action="<?php echo  U("sysadmin/add" , array('action'=>'doadd' , 'showpage'=>1 ) ) ; ?>" method="post">
<div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i>首页<span class="crumb-step">&gt;</span><span class="crumb-name">系统用户</span></div>
        </div>
        
        <div class="result-wrap">
            <div class="result-content">
                    <table class="insert-tab" width="100%">
                        <tbody>
                            <tr>
                                <th><i class="require-red">*</i>用户名字：</th>
                                <td>
                                    <input class="common-text required" id="username" name="username" size="40" value="" type="text"><i>必填</i>
                                </td>
                            </tr>
                           <tr>
                                <th><i class="require-red">*</i>用户昵称：</th>
                                <td>
                                    <input class="common-text required" id="nick" name="nick" size="40" value="" type="text"><i>必填</i>
                                </td>
                            </tr>  
                             <tr>
                                <th><i class="require-red">*</i>密码：</th>
                                <td>
                                    <input class="common-text required" id="passwd" name="passwd" size="40" value="" type="text"><i>必填</i>
                                </td>
                            </tr> 
                            <tr>
                                <th>是否是超级管理员：</th>
                                <td>
                                <input type="radio" name="super_admin" value="1" onclick="super_admin_(1);"/> 是
           <input type="radio" name="super_admin" value="0" onclick="super_admin_(0);" checked/> 不是
                                </td>
                            </tr>
                            <tr id="group_">
                                <th><i class="require-red">*</i>用户组：</th>
                                <td>
<select name="gid" >
				<?php 
					if(isset($list) && $list){
						foreach($list as $k_=>$v_){
					
				?>
				<option value="<?php echo $v_['id'];?>"><?php echo $v_['rolename'];?></option>
				<?php 
						}	
					}
				?>
			</select>
                                </td>
                            </tr>
                            <tr>
                                <th>状态：</th>
                                <td>
                                <input type="radio" name="status" value="1" checked/> 启用
    <input type="radio" name="status" value="0"/> 禁用
                                </td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                </td>
                            </tr>
                        </tbody></table>
            </div>
        </div>
       
      </form>  
    
   </body>
   </html>    
  <script type="text/javascript" src="<?php echo APP_TMPL_PATH ; ?>/static/js/formvalidator.js"></script> 
<script>
function super_admin_(type){
	if(type == 1 ){
		$("#group_").hide();
	}else{
		$("#group_").show();
	}
}
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#username").formValidator({onshow:'请填写用户名',onfocus:'请填写用户名'}).inputValidator({min:1,onerror:'请填写用户名'});
	$("#nick").formValidator({onshow:'昵称必填',onfocus:'请填写昵称'}).inputValidator({min:1,onerror:'请填写昵称'});
	$("#passwd").formValidator({onshow:'密码必填',onfocus:'请填写密码'}).inputValidator({min:1,onerror:'请填写密码'});

});
/*

 $.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#good_link").formValidator({onshow:'请填写宝贝链接',onfocus:'请填写宝贝链接'}).inputValidator({min:1,onerror:'请填写宝贝链接'});
	$("#J_title").formValidator({onshow:'请填写商品名称',onfocus:'请填写商品名称'}).inputValidator({min:1,onerror:'请填写商品名称'});	//$("#J_num_iid").formValidator({onshow:"请填写iid",onfocus:"请填写iid",oncorrect:"填写正确",onempty:"请填写iid"}).inputValidator({min:9,max:11,onerror:"iid应该为9-11位之间的数字"}).regexValidator({regexp:"^[1-9][0-9]*$",onerror:"请填写整数"});
	$("#J_price").formValidator({onshow:"请填写原价",onfocus:"请填写价格",oncorrect:"填写正确",onempty:"请填写价格"}).inputValidator({min:1,max:100,onerror:"请正确填写价格"});	//$("#J_pic_url").formValidator({onshow:"请填写宝贝地址",onfocus:"请填写宝贝地址",oncorrect:"填写正确",onempty:"请填写宝贝地址"}).inputValidator({min:50,onerror:"请正确填写宝贝地址"});
	$("#coupon_price").formValidator({onshow:"请填写秒杀价",onfocus:"请填写秒杀价",oncorrect:"填写正确",onempty:"请填写秒杀价"}).inputValidator({min:1,max:100,onerror:"请填写秒杀价"});
	$("#coupon_start_time").formValidator({onshow:"请选择秒杀开始时间",onfocus:"请选择秒杀开始时间",oncorrect:"填写正确",onempty:"请填写秒杀开始时间"}).inputValidator({min:15,max:30,onerror:"请正确选择秒杀开始时间"});
	$("#coupon_end_time").formValidator({onshow:"请选择秒杀结束时间",onfocus:"请选择秒杀开结束时间",oncorrect:"填写正确",onempty:"请填写秒杀开结束时间"}).inputValidator({min:15,max:30,onerror:"请正确选择秒杀开结束时间"});
	$("#J_volume").formValidator({onshow:"请输入宝贝销量",onfocus:"请输入宝贝销量",oncorrect:"填写正确",onempty:"请输入宝贝销量"}).inputValidator({min:1,max:100,onerror:"请输入正确的数字"});	//$("#J_nick").formValidator({onshow:"请填写掌柜",onfocus:"请填写掌柜",oncorrect:"填写正确",onempty:"请填写标题"}).inputValidator({min:3,max:100,onerror:"请正确填写掌柜"});

 */
</script>
        